Skip to content

docs(database): add the request_timeout spec - #191

Open
grdsdev wants to merge 2 commits into
mainfrom
guilherme/sdk-1789-request-timeout-spec
Open

grdsdev wants to merge 2 commits into
mainfrom
guilherme/sdk-1789-request-timeout-spec

Conversation

@grdsdev

@grdsdev grdsdev commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

Adds specs/database/configuration/request_timeout.md for database.configuration.request_timeout, and updates the capability description to match it.

What the spec says

  • A construction-time value applies to every request. A per-request override, where offered, wins for that request only.
  • The value uses the language's duration type, or a number in the unit of the language's standard timers.
  • Zero or less means unset. Unset means no SDK timeout; the SDK adds no default of its own.
  • Two forms qualify, and the SDK documents which: a deadline (send until body fully read) or an idle timeout (restarts on any progress). Both must cover the response body.
  • The timeout bounds each attempt. Each retry gets the full value; backoff is not timed. A timed-out attempt is a transport failure and follows the normal retry rules.
  • The timeout error is the SDK's transport error, marked as a timeout, and distinct from caller cancellation. A caller who wants one bound across all attempts uses cancellation.

Two Mermaid diagrams show how the value is chosen and how timeouts, retries, and cancellation interact.

How the SDKs compare today

The spec settles the open question from the first draft. It follows the majority of the seven SDKs.

JS Swift Python Dart C# Go Kotlin
Form deadline, headers only idle idle (per phase) idle deadline deadline deadline
Scope per attempt per attempt per attempt per attempt all attempts per attempt per attempt
Timeout retried no yes yes yes n/a yes no
Default none 60 s none (60 s via create_client) none none (HttpClient 100 s) none 30 s
≤ 0 unset unchecked ValueError fires at once unchecked unset throws
Body covered no yes yes yes yes yes yes
Distinct from cancel no yes yes yes yes partly yes

Bold cells diverge from the spec. Per CONTRIBUTING, each gets an issue in its SDK repo after this merges; the spec does not change to match them.

The description in capabilities/database.yaml no longer says "milliseconds" or "deadline", since the spec allows each SDK its own unit and either form.

Relates to SDK-1789.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e0b989cc-1031-44b1-8e17-e3269d54f0e0
Commits

Reviewing files that changed from the base of the PR and between cac8325 and 69e271c.

Files selected for processing: 2

  • packages/capability-matrix/capabilities/database.yaml
  • packages/capability-matrix/specs/database/configuration/request_timeout.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

grdsdev and others added 2 commits November 26, 2026 06:43
Describes the construction-time and per-request timeout contract for
database.configuration.request_timeout: unit and default are documented
per SDK, deadline or idle semantics both satisfy it, the bound applies
per retry attempt, and it composes with caller-initiated cancellation.

Co-Authored-By: Claude <noreply@anthropic.com>
Compare the seven SDKs and settle the open questions: the timeout bounds
each attempt and covers the response body, both deadline and idle forms
qualify, a timeout is distinct from caller cancellation, and an unset value
adds no SDK default. Drop SDK names from the spec, add diagrams, and update
the capability description to match.
@grdsdev
grdsdev force-pushed the guilherme/sdk-1789-request-timeout-spec branch from 8c490de to 69e271c Compare November 26, 2026 09:47
@grdsdev grdsdev changed the title docs(capability-matrix): add the request_timeout spec docs(database): add the request_timeout spec Nov 26, 2026
@grdsdev
grdsdev marked this pull request as ready for review November 26, 2026 09:47
@grdsdev
grdsdev requested a review from a team as a code owner November 26, 2026 09:47

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant